﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EWC.Core.Util.Repositories.CustomAttribute
{
    /// <summary>
    /// 主键特性
    /// @Name 主键字段名
    /// @IsAutoIncrement 是否自增长主键
    /// </summary>
    public class PrimaryKeyAttribute : Attribute
    {
        /// <summary>
        /// 是否自增主键
        /// </summary>
        public bool IsAutoIncrement { get; }

        /// <summary>
        /// 主键字段
        /// </summary>
        public string Name { get; }

        public PrimaryKeyAttribute(string name, bool isAutoIncrement)
        {
            Name = name;
            IsAutoIncrement = isAutoIncrement;
        }
    }
}
